package com.hangzhou.xyj.ui.listener;

import android.view.View;

import com.hangzhou.xyj.XYJApplication;
import com.hangzhou.xyj.manager.IntentManager;

/**
 * @author : neo.duan
 * @date : 	 2016/3/2
 * @desc : 校验是否登录监听器
 */
public abstract class CheckLoginListener implements View.OnClickListener {
    @Override
    public void onClick(View v) {
        //用户未登录:弹出登录登录界面
        if (XYJApplication.getUserInfo() == null) {
            IntentManager.getInstance().goLoginActivity(v.getContext());
        } else {
            onClickView(v);
        }
    }

    public abstract void onClickView(View v);
}
